package com.woniuxy.service;

import com.woniuxy.pojo.SysPermission;
import com.woniuxy.pojo.dto.AddPermissionDTO;
import com.woniuxy.pojo.dto.PermissionTree;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author Administrator
* @description 针对表【t_sys_permission】的数据库操作Service
* @createDate 2025-06-06 11:35:33
*/
public interface SysPermissionService extends IService<SysPermission> {

    List<PermissionTree> getPermissionForest();

    Boolean addLevel1Perm(AddPermissionDTO dto);

    Boolean deletePermission(Integer id);

    Boolean addNewPermission(Integer parentId, SysPermission permission);

    Boolean editPermission(Integer id, SysPermission permission);

    List<SysPermission> getPermissionsByUserId(Integer id);
}
